package com.edu.lawdoc.api.controller.assistor;

import com.jfinal.kit.Kv;
import org.apache.commons.lang3.StringUtils;

import java.util.Map;

public class Kv2 extends Kv {

    public static Kv2 create() {
        return new Kv2();
    }

    public Kv2 hold(Map srcMap, String[] keys) {
        for(String key : keys) {
            Object val = srcMap.get(key);
            if(val != null && StringUtils.isNotBlank(String.valueOf(val))) {
                super.put(key, val);
            }
        }

        return this;
    }
}
